
#pragma once
#ifndef __HITABLE__H__
#define __HITABLE__H__

#include "aabb.h"
#include "ray.h"

class material;

struct hit_record {
	float t;
	vec3 p;
	vec3 normal;
	material* mat_ptr;
	float u,v;
};
class hitable {	
public:
	virtual bool hit(const ray&r,float t_min,float t_max,hit_record&rec)const = 0;

	virtual bool bounding_box(float t0, float t1, aabb& box)const = 0;
};

class material {
public:
	virtual bool scatter(const ray &r_in, const hit_record& rec, vec3& attenuation, ray& scattered)const = 0;

	virtual vec3 emitted(float u, float v, const vec3&p)const {
		return vec3(0, 0, 0);
	}
};
 
#endif